package com.pikaq.service.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Service;

import com.pikaq.entity.User;
import com.pikaq.service.UserService;


public class MainTest {

	private UserService userServiceImpl;
	
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String paths = "classpath:spring-mybatis.xml";
		ApplicationContext ctx = new ClassPathXmlApplicationContext(paths);
		User user  = new User();
		UserService myBean = (UserService)ctx.getBean("userServiceImpl");
		System.out.print(myBean.getLogin(user).getName());
	}

}
